REM --> Start
REM --> Batch file configuration.
@echo OFF

set spacer=______________________________________________________________________________

REM --> Main menu.
:Top
cls
Color 17
echo %spacer%
echo Welcome to the Minecraft installer of hollandcraft.
echo.
echo Visit us at www.hollandcraft.nl for more information.
echo.
echo Server IP: server.hollandcraft.com
echo %spacer%
echo Select an option:
echo.
echo   Play 		Start Minecraft.
echo   Install	Install Minecraft.
echo   Info 		Important information.
echo   Version	Check your client version.
echo   Exit 		Close the installer.
echo.
set /P ANSWER=You choose: 
echo You chose: %ANSWER%
if /i {%ANSWER%}=={Play} (goto :start)
if /i {%ANSWER%}=={Install} (goto :install)
if /i {%ANSWER%}=={Info} (goto :info)
if /i {%ANSWER%}=={Version} (goto :version)
if /i {%ANSWER%}=={Exit} (goto :stop)

REM --> Main menu options.
:start
cls
echo %spacer%
echo Starting the game ...
echo %spacer%
start minecraftSP.jar
goto :stop

:install
cls
echo %spacer%
echo Welcome to the install section.
echo %spacer%
echo Select the client version you wish to install:
echo.
echo   1.0		Client version 1.0
echo   1.1		Client version 1.1
echo   1.2		Client version 1.2
echo   1.3		Client version 1.3
echo   1.3.2		Client version 1.3.2
echo   Back 		Go back to the main menu.
echo.
set /P ANSWER=You choose: 
echo %spacer%
if /i {%ANSWER%}=={1.0} (goto :1.0)
if /i {%ANSWER%}=={1.1} (goto :1.1)
if /i {%ANSWER%}=={1.2} (goto :1.2)
if /i {%ANSWER%}=={1.3} (goto :1.3)
if /i {%ANSWER%}=={1.3.2} (goto :1.3.2) 
if /i {%ANSWER%}=={Back} (goto :Top)

:info
cls
Color 17
echo %spacer%
echo Welcome to the info section.
echo %spacer%
echo Select an option:
echo.
echo   Server	Server information.
echo   Config	Edit the Minecraft configuration file.
echo   About 	About this installer.
echo   Back 		Go back to the main menu.
echo.
SET /P ANSWER=You choose: 
if /i {%ANSWER%}=={server} (goto :server)
if /i {%ANSWER%}=={Config} (goto :config)
if /i {%ANSWER%}=={About} (goto :about)
if /i {%ANSWER%}=={Back} (goto :Top)

:version
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt goto :spout
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt goto :1.0i
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt goto :1.1i
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt goto :1.2i
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt goto :1.3i
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt goto :1.3.2i
goto :Error
pause

:Stop
cls
echo %spacer%
echo Thank you for using HollandCraft installer.
echo.
echo Don't forget to visit the website.
echo "www.hollandcraft.nl"
echo.
echo Have a nice day and good bye.
echo %spacer%
pause
exit

REM --> All installer options.
:1.0
cls
echo %spacer%
echo You chose to install client version 1.0
echo.
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt
copy "files\1.0\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftSP.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\1.0\1.0.txt" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo Client version 1.0 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)

:1.1
cls
echo %spacer%
echo You chose to install client version 1.1
echo.
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt
copy "files\1.1\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftSP.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\1.1\1.1.txt" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo Client version 1.1 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)

:1.2
cls
echo %spacer%
echo You chose to install client version 1.2
echo.
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt
copy "files\1.2\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftSP.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\1.2\1.2.txt" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo Client version 1.2 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)

:1.3
cls
echo %spacer%
echo You chose to install client version 1.3
echo.
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.2.txt
copy "files\1.3\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftSP.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\1.3\1.3.txt" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo Client version 1.3 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)

:1.3.2
cls
echo %spacer%
echo You chose to install client version 1.3.2
echo.
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\spout.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.0.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.1.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.2.txt
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt del C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\1.3.txt
copy "files\1.3.2\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftSP.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\1.3.2\1.3.2.txt" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo Client version 1.3.2 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)

REM --> Extra installer options.
:yes
copy "files\Minecraft.lnk" "C:\users\%USERNAME%\Desktop"
echo %spacer%
pause
start files\minecraftSp.jar
goto :stop

:no
start files\minecraftSp.jar
goto :stop

REM --> Info menu options.
:server
echo %SPACER%
echo   Server IP:   server.hollandcraft.nl
echo.
echo   Register at: www.hollandcraft.nl
echo.
echo   Uptime: 97.77
echo.
echo   Max players online: 100
echo.
echo Redirecting you to the info menu.
echo %SPACER%
pause
goto :info

:Config 
echo %spacer%
echo Minecraft configuration file is opening...
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\options.txt goto :ConfigOpen
goto :Error
echo %spacer%
pause

:About 
cls
color 1
echo %spacer%
echo Made for www.hollandcraft.nl
echo Brought to you by Wasliebob and ThibmoRozier.
echo.
echo All credits for the game files go to their programmers.
echo.
echo Roles:
echo.
echo Wasliebob:	Project leading, programming and bug fixing.
echo.
echo ThibmoRozier:	Project leading, programming and bug fixing.
echo.
echo Redirecting you to the info menu.
echo %spacer%
pause
goto :info

REM --> Configuration file opener.
:ConfigOpen
Start C:\Users\%USERNAME%\AppData\Roaming\.minecraft\options.txt
echo.
echo Redirecting you to the info menu.
pause
goto :info

REM --> Version detail screens.
:spout
cls
color 20
echo %spacer%
echo You have the spout version installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top

:1.0i
cls
color 20
echo %spacer%
echo You have Minecraft version 1.0 installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top

:1.1i
cls
color 20
echo %spacer%
echo You have Minecraft version 1.1 installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top 

:1.2i
cls
color 20
echo %spacer%
echo You have Minecraft version 1.2 installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top

:1.3i
cls
color 20
echo %spacer%
echo You have Minecraft version 1.3 installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top

:1.3.2i
cls
color 20
echo %spacer%
echo You have Minecraft version 1.3.2 installed.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top

REM --> Error screen.
:Error
cls
color 40
echo %spacer%
echo And error has ocured!
echo.
echo There was no version or configuration file found.
echo.
echo Redirecting you to the main menu.
echo %spacer%
pause
goto :Top
REM --> End